package com.itheima.tlias.utils;

/**
 * TODO
 *
 * @Author mr.luo
 * @Date 18 4月 2025 12:11
 */
public class BaseContext {
    private static final ThreadLocal<Integer> THREAD_LOCAL = new ThreadLocal<>();

    //保存员工id到线程本地变量中
    public static void set(Integer id) {
        THREAD_LOCAL.set(id);
    }

    public static Integer get() {
        return THREAD_LOCAL.get();
    }

    public static void remove() {
        THREAD_LOCAL.remove();
    }
}
